﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using Space.Library;
using Space.Model.Data;

namespace Space.Model.Entity
{
    class BoardGrid : EntityBase, IPaint
    {
        private readonly Color _color;

        public BoardGrid(Color color)
        {
            _color = color;
        }


        public void Paint(Painter painter, GameRunner runner)
        {
            // Vertical
            for (int i = 0; i < Board.BoardXMax; i++)
            {
                painter.DrawLine(i * Board.Ssize, 0, i * Board.Ssize, Board.Height, _color, 1);
            }

            // Horizontal
            for (int i = 0; i < Board.BoardYMax; i++)
            {
                painter.DrawLine(0, i * Board.Ssize, Board.Width, i * Board.Ssize, _color, 1);
            }
        }

    }
}
